<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="css/app.css" />
		
		<link rel="stylesheet" href="css/weui.min.css">
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">党员信息明细</h1>
		</header>
		<div class="mui-content">
			<div class="weui-cells" id="weui-cells">
    		</div>
		</div>
	</body>
	<script src="js/mui.min.js"></script>
	<script src="js/util.js"></script>

	<script>
		mui.init({
			swipeBack: true
		});

		(function($) {

			//设置全局beforeSend
			$.ajaxSettings.beforeSend = function(xhr, setting) {
				//beforeSend演示,也可在$.ajax({beforeSend:function(){}})中设置单个Ajax的beforeSend
				console.log('beforeSend:::' + JSON.stringify(setting));
			};
			//设置全局complete
			$.ajaxSettings.complete = function(xhr, status) {
				console.log('complete:::' + status);
			}

			window.onload = function() {
				//从服务器获取数据
				var wv = plus.webview.currentWebview(); //获取当前窗口的WebviewObject对象
				//业务数据获取完毕，并已插入当前页面DOM；
				//注意：若为ajax请求，则需将如下代码放在处理完ajax响应数据之后；
				//通过event.detail可获得传递过来的参数内容
				var ryId = wv.ryId;
				//ryId
				//发送数据
				var data = {
					ryId: ryId,
				};
				mui.ajax({
					url: getRyDetail,
					type: "get",
					data: data,
					async: true,
					dataType: "json",
					headers: {
						accept: "application/json;charset=UTF-8"
					},
					success: function(data) {
						data = eval(data);
						var temp='<div class="weui-cell"><div class="weui-cell__bd"><p>姓名</p></div><div class="weui-cell__ft">'+data.data.xm+'</div></div>';
						temp+='<div class="weui-cell"><div class="weui-cell__bd"><p>性别</p></div><div class="weui-cell__ft">'+data.data.xb+'</div></div>';
						temp+='<div class="weui-cell"><div class="weui-cell__bd"><p>组织名称</p></div><div class="weui-cell__ft">'+data.data.dzzName+'</div></div>';
						temp+='<div class="weui-cell"><div class="weui-cell__bd"><p>岗位</p></div><div class="weui-cell__ft">'+data.data.post+'</div></div>';
						temp+='<div class="weui-cell"><div class="weui-cell__bd"><p>手机号码</p></div><div class="weui-cell__ft">'+data.data.sjhm+'</div></div>';
						temp+='<div class="weui-cell"><div class="weui-cell__bd"><p>身份证号码</p></div><div class="weui-cell__ft">'+data.data.sfzh+'</div></div>';
						document.getElementById("weui-cells").innerHTML=temp;
					}
				})
				mui.plusReady(function() {
					//关闭等待框
					plus.nativeUI.closeWaiting();
					//显示当前页面
					mui.currentWebview.show();
				});
			}
		})(mui);
	</script>

</html>